/* -----------------------------------------------------------
 * Author: Marie Caswell
 * Testing Function: smithyCard()

 * Description: 
 -----------------------------------------------------------*/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

void smithyCard(int currentPlayer, struct gameState *state, int handPos);

int main(){

int seed = 1000;
int numPlayer = 2;
int numCards = 3;
struct gameState G;
int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, sea_hag, tribute, smithy};
memset(&G, 23, sizeof(struct gameState));   // clear the game state
initializeGame(numPlayer, k, seed, &G); // initialize a new game

G.whoseTurn = 0;
G.hand[0][0] = smithy;
G.handCount[0] = numCards;

printf("\nPre-Smithy Card Count: %d \n", G.handCount[0]);

smithyCard(0,&G,0);  //play smithy

printf("\nPost-Smithy Card Count: %d \n", G.handCount[0]);

assert(G.handCount[0] == (numCards + 2)); //player drew three cards and discarded one; confirm new count

printf("\nTest passed.\n\n");

return 0;

 }